#ifndef MSG_AN_H
#define MSG_AN_H
/*************************************************************************
 *
 * Module:	msg_an.h 
 *
 * Purpose:	Defines message structures of msgs between Arbitrator 
 *		and Banknode (MAN).
 *
 * Dependencies:  ebs_defn.h
 *
 * Author:	E.Barasch, H.Cinamon
 *
 * Modification History (latest first):
 * Rv	Date	  By		Reason for change
 * ---  --------  -----------   ---------------------------------------------
 *      09/30/03  ON		Linked Amount messages
 *      04/29/02  AM            Changes for CLS enhancement
 * 19   08/24/00  CB		For Arb Heartbeat:modifications to LOGCENTRAL
 * 18	10/13/99  S.Malkin	Add struct AUTOMATCHINTERRUPT
 * 17   04/11/95  E.Barasch	Ansi-ize
 * 16	02/24/95  E.Howorka	* Add bfAdviceRequest field to QTESUBMIT and
 *                                HITSUBMIT msgs.
 *				* Add HITADVICE and QTEADVICE messages.
 * 15   01/09/95  N.Jain        * Added two bitfields in HitSubmit for
 *                                Composite price display
 * 14   06/20/94  E.Howorka     * Add LOGCENTRAL
 * 13   09/02/93  N.Jain        * Add timstamps for Pairs.bin,Nodes.bin in
 *                                StartupMANRqst message
 * 12   06/02/93  N.Jain        * Add usEbsTradingMode field to signonmanack
 * 11   04/22/93  N.Jain        * Add prcDeal to DEALSTATUSTAKER
 * 10   04/20/93  E.Howorka	* Add MANCHKCREDITDATA, MANCHKCREDITAACK
 * 09   02/20/93  E.Howorka	* Removed bfQteBettered from QtePosition msg
 * 08   02/18/93  N.Jain	* Removed bfQteActive from HitAllDone msg     
 *                              * Added bfWorkingTheBalance flag to QteSubmit
 * 07   01/06/93  N.Jain	* Removed bDealStatus from DealStatusTaker msg
 * 06   01/05/93  E.Howorka	* Added ckpCcyPair and bQteType fields to
 *				  HITNOTIFY, QTEPOSITION, QTECXLED,
 *				  HITINTERRUPTED, HITALLDONE, QTESUBMITACK.
 *				* Moved field bQteType to follow ckpCcyPair
 *				  in QTESUBMIT for consistency with other 
 *				  messages.
 *				* Moved field bHitType to follow ckpCcyPair
 *				  in HITSUBMIT for consistency with other 
 *				  messages.
 *				* Moved DEALSTATUSMAKER to msg_xy.h
 * 05   11/20/92  E.Howorka	Add ulMsecDeltaDealPending and usTicketNumMaker
 *				to DEALSTATUSMAKER.  Add ulMsecHitToDeal and
 *				usTicketNumTaker to DEALSTATUSTAKER.
 * 04   10/23/92  E.Wrzesien    rearrange dealstatusmaker and dealstatustaker
 *				delete creditupdate msg
 * 03	10/15/92  E.Wrzesien	added bDealStatus to msg DEALSTATUSMAKER
 *				added AN_QteCxled message
 * 02	10/09/92  E.Wrzesien    added message AN_HITINTERRUPTED
 * 01	07/14/92  HBC		Initial creation. Move msg types to msg_types.h
 *
 *************************************************************************/

/* Include files */
/* ------------- */
#include "ebs_defn.h"


/*
   NAME :NA_DealStatusTaker
   DESC :This message is sent by the taker's MAN (or, in case of an
         automatched deal, by the new maker's MAN) after a deal has been
         completed.  If the deal did not succeed, DealAmtFinal is set to zero.
*/
typedef struct _DEALSTATUSTAKER  *PDEALSTATUSTAKER;             /* pdst */
typedef struct _DEALSTATUSTAKER                                 /*  dst */
        {
           MSGHDREBS           mhebs;
           CCYKEYPAIR          ckpCcyPair;
           FXBYTE              bQteType;
           EBSTRANSID          etiQteId;	/* set by Arb (for logging) */
           FXBASEAMT           baDealAmtFinal;
           EBSDEALID           ediDealId; 
           FXBOOL              fCreditOk;
           FXUSHORT            usTicketNumTaker;
	   FXUSHORT            usMsecDeltaHitToDeal;
           FXBYTE              bReserved;
           FXBYTE              bSecDeltaHitToDST;  /* set by Arb; the number of
                                                      seconds between the
                                                      receipt of the hit and the
                                                      DealStatusTaker */
           FXPRICE             prcDeal;
        }DEALSTATUSTAKER;

/*
   NAME :NA_DealStatusTaker2
   DESC :This message is sent by the taker's MAN (or, in case of an
         automatched deal, by the new maker's MAN) after a deal has been
         completed.  If the deal did not succeed, DealAmtFinal is set to zero.
*/
typedef struct _DEALSTATUSTAKER2  *PDEALSTATUSTAKER2;           /* pdst */
typedef struct _DEALSTATUSTAKER2                                /*  dst */
        {
           MSGHDREBS           mhebs;
           CCYKEYPAIR          ckpCcyPair;
           FXBYTE              bQteType;
           EBSTRANSID          etiQteId;	/* set by Arb (for logging) */
           FXBASEAMT           baDealAmtFinal;
           EBSDEALID           ediDealId; 
           FXUSHORT            usTicketNumTaker;
	   FXUSHORT            usMsecDeltaHitToDeal;
           FXBYTE              bReserved;
           FXBYTE              bSecDeltaHitToDST;  /* set by Arb; the number of
                                                      seconds between the
                                                      receipt of the hit and the
                                                      DealStatusTaker */
           FXUSHORT            usMsecHunt;
           FXUSHORT            usHuntRsrv;
           FXPRICE             prcDeal;
           FXFLRKEY            fkMaker;
           FXFLRKEY            fkTaker;
           FXFLRKEY            fkMakerPB;
           FXFLRKEY            fkTakerPB;
           FXBITFIELD          bfCreditOk               : 1;
           FXBITFIELD          bfExcludeFromMarketData  : 1;
           FXBITFIELD          bfAutomatch              : 1;
           FXBITFIELD          bfTakerSold              : 1; /* FALSE==taker
                                                                bought */
           FXBITFIELD          bfFlagReserve            : 20;
        }DEALSTATUSTAKER2;


typedef struct _DEALSTATUSTAKER3  *PDEALSTATUSTAKER3;           /* pdst */
typedef struct _DEALSTATUSTAKER3                                /*  dst */
        {
           MSGHDREBS           mhebs;
   	   FXUSHORT	       usLength; /* length of payload minus 2 bytes */
   	   FXUSHORT    	       usVersion;
           CCYKEYPAIR          ckpCcyPair;
           FXBYTE              bQteType;
           EBSTRANSID          etiQteId;	/* set by Arb (for logging) */
           FXBASEAMT           baDealAmtFinal;
           EBSDEALID           ediDealId; 
           FXUSHORT            usTicketNumTaker;
	   FXUSHORT            usMsecDeltaHitToDeal;
           FXBYTE              bReserved;
           FXBYTE              bSecDeltaHitToDST;  /* set by Arb; the number of
                                                      seconds between the
                                                      receipt of the hit and the
                                                      DealStatusTaker */
           FXUSHORT            usMsecHunt;
           FXUSHORT            usHuntRsrv;
           FXPRICE             prcDeal;
           FXFLRKEY            fkMaker;
           FXFLRKEY            fkTaker;
           FXFLRKEY            fkMakerPB;
           FXFLRKEY            fkTakerPB;
           FXBITFIELD          bfCreditOk               : 1;
           FXBITFIELD          bfExcludeFromMarketData  : 1;
           FXBITFIELD          bfAutomatch              : 1;
           FXBITFIELD          bfTakerSold              : 1; /* FALSE==taker
                                                                bought */
           FXBITFIELD          bfFlagReserve            : 20;
	   FXPRICE             prcEffectiveDealPrice;
   	   FXDATE              dateValue;
   	   FXDATE              dateTrade;
   	   FXDATE              dateValuation;          /* 0 for non-NDF deals */
   	   FXDATE              dateSettlement;         /* 0 for non-NDF deals */
           FXCHAR              Reserved[500];
        }DEALSTATUSTAKER3;

/*
   NAME :NA_SignonMANRqst
   DESC :Sent during startup by a Market Access Node signing on to its
         Arbitrator.
*/
typedef struct _SIGNONMANRQST  *PSIGNONMANRQST;                 /* psonmr */
typedef struct _SIGNONMANRQST                                   /*  sonmr */
        {
           MSGHDREBS           mhebs;
           FXFLRKEY            fkFloorKey;
           FXTIMESTAMP         tsPairsFile;
           FXTIMESTAMP         tsNodesFile;
        }SIGNONMANRQST;


/*
   NAME :NA_SignonMANRqst2
   DESC :Sent during startup by a Market Access Node signing on to its
         Arbitrator.
*/
typedef struct _SIGNONMANRQST2  *PSIGNONMANRQST2;               /* psonmr */
typedef struct _SIGNONMANRQST2                                  /*  sonmr */
        {
           MSGHDREBS           mhebs;
           FXFLRKEY            fkFloorKey;
           FXTIMESTAMP         tsPairsFile;
           FXTIMESTAMP         tsNodesFile;
           IPINFO              ipi;
           FXBITFIELD          bfPB21Mode       : 1;  /* TRUE==flr is operating
                                                               in PB 2.1 mode */
           FXBITFIELD          bfReserved       : 7;
           FXCHAR              Reserved[50];
        }SIGNONMANRQST2;


/*
   NAME :NA_SignonMANRqst3
   DESC :Sent during startup by a Market Access Node signing on to its
         Arbitrator.  Variable length message.
*/
typedef struct _SIGNONMANRQST3  *PSIGNONMANRQST3;               /* psonmr */
typedef struct _SIGNONMANRQST3                                  /*  sonmr */
        {
           MSGHDREBS           mhebs;
           FXFLRKEY            fkFloorKey;
           FXTIMESTAMP         tsPairsFile;
           FXTIMESTAMP         tsNodesFile;
           IPINFO              ipi;
           FXBITFIELD          bfReserved       : 8;
           FXTIMESTAMP         tsGlobalFile;
           IPINFO              ipiSecondary;
           FXUSHORT            usLength;              /* the number of bytes
                                                         present in SignonExt */
           variant_union
           {
             struct
             {
               /* insert new fields in this structure */

               FXBYTE           bPlaceholder;  /* remove this field when the
                                                  first field is added to the
                                                  SignonExt structure; this
                                                  field is only here to prevent
                                                  a warning message during
                                                  compilation */
             } SignonExt;

             FXBYTE            abExt[DIM_MAX_MAN_SIGNON_EXT];
                                     /* this field is not intended for use in
                                        referencing data; it is present to
                                        provide a maximum size for the structure
                                        in order to allow for the allocation of
                                        a SIGNONMANRQST3 variable and for the
                                        validation of received message size */
           } vu1;
        }SIGNONMANRQST3;


/*
    NAME :AN_SignonMANAck
    DESC :Sent in response to NA_SignonMANRqst
*/
typedef struct _SIGNONMANACK  *PSIGNONMANACK;                   /* psonma */
typedef struct _SIGNONMANACK                                    /*  sonma */
        {
           MSGHDREBS           mhebs;
           FXBYTE              bSignonStatus;
           FXUSHORT            usEbsTradingMode;
        }SIGNONMANACK;

/*
   NAME :AN_HitAllDone
   DESC :The Arbitrator sends this message to the taker's MAN when
    	 the hit request has completed. This informs the MAN that no
    	 more deals will be received for the corresponding hit request.
*/
typedef struct _HITALLDONE  *PHITALLDONE;                       /* phad */
typedef struct _HITALLDONE                                      /*  had */
        {
           MSGHDREBS           mhebs;
           CCYKEYPAIR          ckpCcyPair;
           FXBYTE              bHitType;
           FXBASEAMT           baHitAmtMissed;
           EBSTRANSID          etiHitId;                   
           FXBYTE              bHitAllDoneStatus;
        }HITALLDONE;

/*
    NAME :AN_HitNotify
    DESC :Notification of hit.
*/
typedef struct _HITNOTIFY  *PHITNOTIFY;                         /* phn */
typedef struct _HITNOTIFY                                       /*  hn */
        {
           MSGHDREBS           mhebs;
           CCYKEYPAIR          ckpCcyPair;
           FXBYTE              bQteType;
           EBSDEALID           ediDealId;
           FXBASEAMT           baDealAmtAvail;
           FXFLRKEY            fkTaker;
           FXDATE              dateValue;
           FXCHAR              achTraderIdTaker[DIM_TRADER_ID];
           EBSTRANSID          etiQteId; 
        }HITNOTIFY;


/*
    NAME :AN_HitNotify2
    DESC :Notification of hit.
*/
typedef struct _HITNOTIFY2  *PHITNOTIFY2;                       /* phn */
typedef struct _HITNOTIFY2                                      /*  hn */
        {
           MSGHDREBS           mhebs;
           CCYKEYPAIR          ckpCcyPair;
           FXBYTE              bQteType;
           EBSDEALID           ediDealId;
           FXBASEAMT           baDealAmtAvail;
           FXFLRKEY            fkTaker;
           FXDATE              dateValue;
           FXCHAR              achTraderIdTaker[DIM_TRADER_ID];
           EBSTRANSID          etiQteId; 
           FXFLRKEY            fkMaker;
           EBSPBID             epbiTaker;
           EBSPBID             epbiMaker;
           IPINFO              ipiTaker;
        }HITNOTIFY2;


/*
    NAME :AN_HitNotify3
    DESC :Notification of hit.
*/
typedef struct _HITNOTIFY3  *PHITNOTIFY3;                       /* phn */
typedef struct _HITNOTIFY3                                      /*  hn */
        {
           MSGHDREBS           mhebs;
           CCYKEYPAIR          ckpCcyPair;
           FXBYTE              bQteType;
           EBSDEALID           ediDealId;
           FXBASEAMT           baDealAmtAvail;
           FXFLRKEY            fkTaker;
           FXDATE              dateValue;
           FXCHAR              achTraderIdTaker[DIM_TRADER_ID];
           EBSTRANSID          etiQteId; 
           FXFLRKEY            fkMaker;
           EBSPBID             epbiTaker;
           EBSPBID             epbiMaker;
           IPINFO              ipiTaker;
           FXBITFIELD          bfPBOwnerMaker   : 1;
           FXBITFIELD          bfPBOwnerTaker   : 1;
           FXBITFIELD          bfSpare          : 6;
        }HITNOTIFY3;


/*
    NAME :AN_HitNotify4
    DESC :Notification of hit.
*/
typedef struct _HITNOTIFY4  *PHITNOTIFY4;                       /* phn */
typedef struct _HITNOTIFY4                                      /*  hn */
        {
           MSGHDREBS           mhebs;
           CCYKEYPAIR          ckpCcyPair;
           FXBYTE              bQteType;
           EBSDEALID           ediDealId;
           FXBASEAMT           baDealAmtAvail;
           FXFLRKEY            fkTaker;
           FXDATE              dateValue;
           FXCHAR              achTraderIdTaker[DIM_TRADER_ID];
           EBSTRANSID          etiQteId; 
           FXFLRKEY            fkMaker;
           EBSPBID             epbiTaker;
           EBSPBID             epbiMaker;
           IPINFO              ipiTaker;
           FXBITFIELD          bfPBOwnerMaker   : 1;
           FXBITFIELD          bfPBOwnerTaker   : 1;
           FXBITFIELD          bfSpare          : 6;
           IPINFO              ipiTakerSecondary;
           USHORT              usVersionTaker;
        }HITNOTIFY4;


/*
   NAME :NA_HitSubmit
   DESC :A taker's MAN sends this message to the Arb when hitting
         a quote in EBS.
*/
typedef struct _HITSUBMIT  *PHITSUBMIT;                         /* phs  */
typedef struct _HITSUBMIT                                       /*  hs  */
        {
           MSGHDREBS           mhebs;
           CCYKEYPAIR          ckpCcyPair;
           FXBYTE              bHitType;
           FXPRICE             prcHit;
           FXBASEAMT           baHitAmt;
           FXFLRKEY            fkTaker;
           FXDATE              dateValue;
           EBSTRANSID          etiHitId;                   
           FXCHAR              achTraderIdTaker [DIM_TRADER_ID];
           FXBITFIELD          bfCxlWhenBettered    : 1;
           FXBITFIELD          bfWorkBalPartial     : 1;
           FXBITFIELD          bfWorkBalComplete    : 1;
           FXBITFIELD          bfHitRegular         : 1;
           FXBITFIELD          bfHitPriceChanged    : 1;
           FXBITFIELD          bfAdviceRequest      : 1;
           FXBITFIELD          bfAutomatic          : 1;
           FXBITFIELD          bfSpare              : 1;
        }HITSUBMIT;



/*
   NAME :NA_HitSubmit2
   DESC :A taker's MAN sends this message to the Arb when hitting
         a quote in EBS.
*/
typedef struct _HITSUBMIT2  *PHITSUBMIT2;                       /* phs  */
typedef struct _HITSUBMIT2                                      /*  hs  */
        {
           MSGHDREBS           mhebs;
           CCYKEYPAIR          ckpCcyPair;
           FXBYTE              bHitType;
           FXPRICE             prcHit;
           FXBASEAMT           baHitAmt;
           FXFLRKEY            fkTaker;
           FXDATE              dateValue;
           EBSTRANSID          etiHitId;                   
           FXCHAR              achTraderIdTaker [DIM_TRADER_ID];
           FXBITFIELD          bfCxlWhenBettered    : 1;
           FXBITFIELD          bfWorkBalPartial     : 1;
           FXBITFIELD          bfWorkBalComplete    : 1;
           FXBITFIELD          bfHitRegular         : 1;
           FXBITFIELD          bfHitPriceChanged    : 1;
           FXBITFIELD          bfAdviceRequest      : 1;
           FXBITFIELD          bfAutomatic          : 1;
           FXBITFIELD          bfPBOwner            : 1;
           FXBITFIELD          bfSpare              : 8;
           FXBYTE              bItemCnt;     /* #of entries in aepbiPBPriority*/
           EBSPBID             aepbiPBPriority[DIM_MAX_PB_PER_FLOOR];
                                             /* the preferred PBs to use;     */
                                             /* variable length array; # of   */
                                             /* entries specified by bItemCnt */
        }HITSUBMIT2;



typedef HITSUBMIT2 HITSUBMIT3;                                  /*  hs */

typedef PHITSUBMIT2 PHITSUBMIT3;                                /* phs */


/*  */
/*
   NAME :AN_QtePosition
   DESC :The Arb sends this message to the maker's MAN when a quote 
         changes its status as 'Best', and/or 'Canceled'.
*/
typedef struct _QTEPOSITION  *PQTEPOSITION;                     /* pqp */
typedef struct _QTEPOSITION                                     /*  qp */
        {
           MSGHDREBS           mhebs;
           CCYKEYPAIR          ckpCcyPair;
           FXBYTE              bQteType;
           EBSTRANSID          etiQteId;
           FXBITFIELD          bfQteBest       : 1;
           FXBITFIELD          bfQteCxled      : 1;
        }QTEPOSITION;


/*
   NAME :NA_QteSubmit
   DESC :A maker's MAN sends this message to the Arb when submitting a 
         quote into EBS.
*/
typedef struct _QTESUBMIT  *PQTESUBMIT;                         /* pqs */
typedef struct _QTESUBMIT                                       /*  qs */
        {
           MSGHDREBS           mhebs;
           CCYKEYPAIR          ckpCcyPair;
           FXBYTE              bQteType;
           FXPRICE             prcQte;
           FXBASEAMT           baQteAmt;
           FXFLRKEY            fkMaker;
           FXDATE              dateValue;
           EBSTRANSID          etiQteId;                   
           FXCHAR              achTraderIdMaker [DIM_TRADER_ID];
           FXBITFIELD          bfCxlWhenBettered    : 1;
           FXBITFIELD          bfWorkingTheBalance  : 1;
           FXBITFIELD          bfAdviceRequest      : 1;
           FXBITFIELD          bfAutomatic          : 1;
           FXBITFIELD          bfSpare              : 4;
        }QTESUBMIT;

/*
   NAME :NA_QteSubmit2
   DESC :A maker's MAN sends this message to the Arb when submitting a 
         quote into EBS. Linked Amounts version
*/
typedef struct _QTESUBMIT2  *PQTESUBMIT2;                         /* pqs */
typedef struct _QTESUBMIT2                                       /*  qs */
        {
           MSGHDREBS           mhebs;
           CCYKEYPAIR          ckpCcyPair;
           FXBYTE              bQteType;
           FXPRICE             prcQte;
           FXBASEAMT           baQteAmt;
	   FXBASEAMT	       baLinkedAmt;	/* new for Linked Amounts */
           FXFLRKEY            fkMaker;
           FXDATE              dateValue;
           EBSTRANSID          etiQteId;                   
           FXCHAR              achTraderIdMaker [DIM_TRADER_ID];
           FXBITFIELD          bfCxlWhenBettered    : 1;
           FXBITFIELD          bfWorkingTheBalance  : 1;
           FXBITFIELD          bfAdviceRequest      : 1;
           FXBITFIELD          bfAutomatic          : 1;
           FXBITFIELD          bfSpare              : 4;
        }QTESUBMIT2;


/*
   NAME :NA_QteSubmit3
   DESC :A maker's MAN sends this message to the Arb when submitting a 
         quote into EBS.  PB 2.1 (and higher) version.
*/
typedef struct _QTESUBMIT3  *PQTESUBMIT3;                         /* pqs */
typedef struct _QTESUBMIT3                                        /*  qs */
        {
           MSGHDREBS           mhebs;
           CCYKEYPAIR          ckpCcyPair;
           FXBYTE              bQteType;
           FXPRICE             prcQte;
           FXBASEAMT           baQteAmt;
	   FXBASEAMT	       baLinkedAmt;
           FXFLRKEY            fkMaker;
           FXDATE              dateValue;
           EBSTRANSID          etiQteId;                   
           FXCHAR              achTraderIdMaker [DIM_TRADER_ID];
           FXBITFIELD          bfCxlWhenBettered    : 1;
           FXBITFIELD          bfWorkingTheBalance  : 1;
           FXBITFIELD          bfAdviceRequest      : 1;
           FXBITFIELD          bfAutomatic          : 1;
           FXBITFIELD          bfPBOwner            : 1;
           FXBITFIELD          bfIntentAutomatch    : 1;
           FXBITFIELD          bfUseIntentBit       : 1;  /* TRUE == use the
                                                             value of the
                                                             bfIntentAutomatch
                                                             bit to determine if
                                                             quote was an inten-
                                                             tional automatch */
           FXBITFIELD          bfSpare              : 9;
           EBSPBID             epbiMakerPB;  /* the PB to use when quote is   */
                                             /* matched as a maker            */
           FXBYTE              bItemCnt;     /* #of entries in aepbiPBPriority*/
           EBSPBID             aepbiPBPriority[DIM_MAX_PB_PER_FLOOR];
                                             /* the preferred PBs to use when */
                                             /* quote is matched as a taker;  */
                                             /* variable length array; # of   */
                                             /* entries specified by bItemCnt */
        }QTESUBMIT3;

typedef QTESUBMIT3 QTESUBMIT4;                                    /*  qs */

typedef PQTESUBMIT3 PQTESUBMIT4;                                  /* pqs */


/*
   NAME :AN_QteSubmitAck
   DESC :Acknowledement to quote submission message from Arb to MAN.
*/
typedef struct _QTESUBMITACK  *PQTESUBMITACK;                   /* pqsa */
typedef struct _QTESUBMITACK                                    /*  qsa */
        {
           MSGHDREBS           mhebs;
           CCYKEYPAIR          ckpCcyPair;
           FXBYTE              bQteType;
           EBSTRANSID          etiQteId; 
           FXBYTE              bQteSubmitStatus;
        }QTESUBMITACK;

/*
  NAME: AN_HITINTERRUPTED
  DESC: Hit interrupted at the Arbitrator
*/
typedef struct _HITINTERRUPTED  *PHITINTERRUPTED;		/* phint */
typedef struct _HITINTERRUPTED					/* hint  */
	{
	   MSGHDREBS		mhebs;
           CCYKEYPAIR           ckpCcyPair;
           FXBYTE               bHitType;
	   EBSTRANSID		etiHitId;
	}HITINTERRUPTED;

/*  */

/*
   NAME :AN_QteCxled
   DESC :When the ARB must remove quote in error situations,
         it sends this message to MAN with quote outstanding.
*/
typedef struct _QTECXLED  *PQTECXLED;                           /* pqc */
typedef struct _QTECXLED                                        /*  qc */
        {
           MSGHDREBS           mhebs;
           CCYKEYPAIR          ckpCcyPair;
           FXBYTE              bQteType;
           EBSTRANSID          etiQteId; 
           FXBYTE              bQteCxlStatus;
        }QTECXLED;



/*
   NAME :NA_MANChkCreditData
   DESC :This message contains a reduced representation ("checksum") of the
         MAN's YES/NO credit vector.  It is used to validate the corresponding
	 data held by the MAN's Arbitrator.
*/
typedef struct _MANCHKCREDITDATA  *PMANCHKCREDITDATA;           /* pmccd */
typedef struct _MANCHKCREDITDATA                                /*  mccd */
        {
           MSGHDREBS           mhebs;
           FXFLRKEY            fkFloorKey;
           FXLONG              lCreditChk;
        }MANCHKCREDITDATA;


/*
   NAME :AN_MANChkCreditDataAck
   DESC :This message is sent in response to NA_MANChkCreditData.
*/
typedef struct _MANCHKCREDITDATAACK  *PMANCHKCREDITDATAACK;     /* pmccda */
typedef struct _MANCHKCREDITDATAACK                             /*  mccda */
        {
           MSGHDREBS           mhebs;
           FXBOOL              fChkOk;
        }MANCHKCREDITDATAACK;




/*

   NAME :NA_CLSCpartyUpdate
   DESC :This message specifies that a floor enables (or disables) a number
          of other trading floors as CLS partners (i.e. the floor states that
          it can [or cannot] perform CLS deals with the specified floors).
*/
typedef struct _CLSCPARTYUPDATE    *PCLSCPARTYUPDATE;              /* pccu */
typedef struct _CLSCPARTYUPDATE                                    /*  ccu */
        {
           MSGHDREBS           mhebs;
           FXFLRKEY            fkFloorKey;
           FXBITFIELD          bfResynch       : 1;
           FXBITFIELD          bfCLSEnabled    : 1;
           FXBITFIELD          bfMsgMore       : 1;
           FXBITFIELD          bfReserved      : 5;
           FXBYTE              bItemCnt;
           FXFLRKEY            afkCparty [DIM_MAX_FLR_KEYS];
         }CLSCPARTYUPDATE;


/*
   NAME :NA_MANChkCpartyData
   DESC :This message contains a reduced representation ("checksum") of the
         MAN's YES/NO credit vector and CLS partner vector.  It is used to
	 validate the corresponding data held by the MAN's Arbitrator.
*/
typedef struct _MANCHKCPARTYDATA  *PMANCHKCPARTYDATA;           /* pmcccd */
typedef struct _MANCHKCPARTYDATA                                /*  mcccd */
        {
           MSGHDREBS           mhebs;
           FXFLRKEY            fkFloorKey;
           FXLONG              lCreditChk;
           FXLONG              lCLSChk;
        }MANCHKCPARTYDATA;


/*
   NAME :AN_MANChkCpartyDataAck
   DESC :This message is sent in response to NA_MANChkCpartyData.
*/
typedef struct _MANCHKCPARTYDATAACK  *PMANCHKCPARTYDATAACK;     /* pmcccda */
typedef struct _MANCHKCPARTYDATAACK                             /*  mcccda */
        {
           MSGHDREBS           mhebs;
           FXBITFIELD          bfCreditChkOk   : 1;
           FXBITFIELD          bfCLSChkOk      : 1;
           FXBITFIELD          bfReserved      : 6;
        }MANCHKCPARTYDATAACK;




/*
    NAME :NN_LOGCENTRAL
    	  NA_LOGCENTRAL
    DESC :Message sent by Trade Server to the Log Manager to log trade and
	  performance statistics.
*/
typedef struct _LOGCENTRAL  *PLOGCENTRAL;                       /* plc */
typedef struct _LOGCENTRAL                                      /*  lc */
        {
           MSGHDREBS           mhebs;
           FXFLRKEY            fkFloorKey;
           LOGCENTRALDETAILS   lcd;
        }LOGCENTRAL;


/*
    NAME :AN_HitAdvice
    DESC :Sent by the Arbitrator in response to NA_HitSubmit 
          message (with bfAdviceRequest flag set).  The field 
          baAmtPending is the total amount of deals initiated by 
          the Arbitrator upon reception of the NA_HitSubmit 
          message.
*/
typedef struct _HITADVICE  *PHITADVICE;				/* phav */
typedef struct _HITADVICE					/*  hav */
        {
           MSGHDREBS           mhebs;
           CCYKEYPAIR          ckpCcyPair;
           FXBYTE              bHitType;
           EBSTRANSID          etiHitId; 
           FXBASEAMT           baAmtPending;
           FXCHAR              achSpare[4];
        }HITADVICE;


/*
    NAME :AN_QteAdvice
    DESC :Sent by the Arbitrator in response to NA_QteSubmit 
          message (with bfAdviceRequest flag set).  The field 
          baAmtPending is the total amount of automatched deals 
          initiated by the Arbitrator upon reception of the 
          NA_QteSubmit message.
*/
typedef struct _QTEADVICE  *PQTEADVICE;				/* pqav */
typedef struct _QTEADVICE					/*  qav */
        {
           MSGHDREBS           mhebs;
           CCYKEYPAIR          ckpCcyPair;
           FXBYTE              bQteType;
           EBSTRANSID          etiQteId; 
           FXBASEAMT           baAmtPending;
           FXCHAR              achSpare[4];
        }QTEADVICE;

/*
    NAME :NA_AutomatchInterrupt
    DESC :A MAN sends this message to the Arb to signal that it wants to 
	  interrupt a previously submitted quote which was an intentional
	  automatch. This message is generated when a trader presses the
	  "interrupt" key when an intentional automatch is in progress.
*/
typedef struct _AUTOMATCHINTERRUPT  *PAUTOMATCHINTERRUPT;	/* pai */
typedef struct _AUTOMATCHINTERRUPT	    			/*  ai */
        {
           MSGHDREBS           mhebs;
           CCYKEYPAIR          ckpCcyPair;
           FXBYTE              bQteType;
           EBSTRANSID          etiQteId; 
        }AUTOMATCHINTERRUPT;

/*
   NAME :WN_LinkedQteDone
   DESC :The quote is completed at the arb (With linked amounts)
*/
typedef struct _LINKEDQTEDONE  *PLINKEDQTEDONE;           /* plqd */
typedef struct _LINKEDQTEDONE                             /*  lqd */
        {
           MSGHDREBS           mhebs;
           CCYKEYPAIR          ckpCcyPair;
           FXBYTE              bQteType;
           EBSTRANSID          etiQteId;                   
        }LINKEDQTEDONE;


#endif
